/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.selfstudyinformation.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.selfstudyinformation.entity.SelfStudyInformation;
import com.jeeplus.modules.selfstudyinformation.mapper.SelfStudyInformationMapper;

/**
 * 自习信息Service
 * @author 秦子洋
 * @version 2022-04-11
 */
@Service
@Transactional(readOnly = true)
public class SelfStudyInformationService extends CrudService<SelfStudyInformationMapper, SelfStudyInformation> {

	@Autowired
	SelfStudyInformationMapper mapper;

	public SelfStudyInformation get(String id) {
		return super.get(id);
	}
	
	public List<SelfStudyInformation> findList(SelfStudyInformation selfStudyInformation) {
		return super.findList(selfStudyInformation);
	}

	public SelfStudyInformation queryDate(SelfStudyInformation selfStudyInformation){
		return mapper.queryDate(selfStudyInformation);
	}

	public Page<SelfStudyInformation> findPage(Page<SelfStudyInformation> page, SelfStudyInformation selfStudyInformation) {
		return super.findPage(page, selfStudyInformation);
	}
	public Page<SelfStudyInformation> findNotgo(Page<SelfStudyInformation> page, SelfStudyInformation entity) {
		dataRuleFilter(entity);
		entity.setPage(page);
		page.setList(mapper.findNotgo(entity));
		return page;
	}

	public List<SelfStudyInformation> findAllNotgoByStudentId(Page<SelfStudyInformation> page, SelfStudyInformation entity) {
		return mapper.findAllNotgoByStudentId(entity);
	}
	@Transactional(readOnly = false)
	public int updateGoTime(SelfStudyInformation entity){return mapper.update(entity);}
	@Transactional(readOnly = false)
	public void save(SelfStudyInformation selfStudyInformation) {
		super.save(selfStudyInformation);
	}
	
	@Transactional(readOnly = false)
	public void delete(SelfStudyInformation selfStudyInformation) {
		super.delete(selfStudyInformation);
	}
	
}